WARNING: This program has a logic error, so we have to debug it.

RULE: Every function needs to be called in order to execute. This includes the main function.

  • Click Run and you will see that nothing happens on the stage.
  • Fix the program so that the stage will be set. Note: Make sure every function is called!
  • Click Run to test if you fixed the program. When it is fixed, click Submit and Next.

To navigate the page using the TAB key, first press ESC to exit the code editor.

#This program will recreate the story of the 3 little pigs def set_stage(): """ Sets up the stage for the start of the story """ stage.set_background("barn") sprite = codesters.Sprite("pig",-100,-125) def main(): """ Sets up the program and calls other functions """ set_stage()
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)